<?php
/**
 * Created by PhpStorm.
 * User: albert
 * Date: 18-5-17
 * Time: 下午9:47
 */
return [
    'functions' => [
        'class' => \yii\swoole\base\BootFunction::class
    ],
    'addlisten' => [
        'class' => \yii\swoole\base\AddListener::class,
        'listen' => [
            'rpc' => [SWOOLE_SOCK_TCP, ['receive' => [\yii\swoole\server\RpcServer::getInstance(), 'onReceive']]],
//            'mqtt' => [SWOOLE_SOCK_TCP, ['receive' => [\yii\swoole\mqtt\MqttServer::getInstance(), 'onReceive']]],
            'udp' => [SWOOLE_SOCK_UDP, ['packet' => [\yii\swoole\udp\UdpServer::getInstance(), 'onPacket']]]
        ]
    ],
    'ws' => [
        'class' => \yii\swoole\websocket\WsBeforeStart::class
    ]
];